using System;
using System.Collections.Generic;
using System.Text;
using FluentNHibernate.Mapping;

namespace Models.DataAccess
{
    public class FolderMap : ClassMap<Folders>
    {
        public FolderMap()
        {
            Table("Folders");
            LazyLoad();
            Id(x => x.FolderId).GeneratedBy.Guid().Column("FolderId");
            Map(x => x.ParentId).Column("ParentId");
            Map(x => x.FolderName).Column("FolderName").Not.Nullable().Length(50);
            HasMany(x => x.PageContents).KeyColumn("FolderId");
        }
    }
}
